package com.zhuzl.stockservice.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhuzl.stockservice.model.StockInfo;
import org.apache.ibatis.annotations.Param;

/**
 * @author JZY001
 */
public interface StockInfoMapper extends BaseMapper<StockInfo> {

    /**
     * 扣减库存
     *
     * @param id    商品id
     * @param count 数量
     * @return row
     */
    int decrease(@Param("id") Integer id, @Param("count") Integer count);

}
